'use strict'

const titbit = require('titbit');
const {cookie, session} = require('titbit-toolkit')

const app = new titbit({
    debug: true
})

app.use(new cookie).use(new session)

app.get('/', async c => {
    c.send('ok')
})

app.get('/sess/:x/:y', async c => {
    c.setSession('x', c.param.x)
    c.setSession('y', c.param.y)

    c.send(c.getSession())
    
})

app.run(8081)
